{# A checkout link for one catalog price, the page a customer would be sent to. A recurring price makes a subscription (always one seat). #} {% from "components/macros/layout.html" import card %} {% from "components/macros/form.html" import field, select, text_input, primary_button %}
{% call card("New checkout", "Stripe-hosted", id="payment-checkout") %} {% if missing %}

Checkout needs a Stripe key. Set {{ missing }} in .env and restart.

{% elif not prices %}

The Stripe account has no active prices. Add a product with a price in the Stripe dashboard.

{% else %}
{% call field("Price") %}{{ select("price", prices, blank=None, block=True) }}{% endcall %} {% call field("Quantity") %}{{ text_input("quantity", "1") }}{% endcall %} {% call field("Success URL") %}{{ text_input("success_url", None, success_url) }}{% endcall %} {% call field("Cancel URL") %}{{ text_input("cancel_url", None, cancel_url) }}{% endcall %} {{ primary_button("Create checkout", "submit") }}
{% endif %} {% endcall %}